<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>订单管理</title>
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>views/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>views/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>views/css/main.css" />
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>views/css/user.css" />
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>views/css/square/blue.css" />
<script type="text/javascript"
	src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<link rel="stylesheet"
	href="<%=basePath%>views/upai/layui/css/layui.css" media="all"></link>
<link href="<%=basePath%>views/upai/css/common.css" rel="stylesheet"></link>
<link href="<%=basePath%>views/upai/css/style.css" rel="stylesheet"></link>
<link href="<%=basePath%>views/upai/css/idangerous.swiper.css"
	rel="stylesheet"></link>
<link href="<%=basePath%>views/upai/css/team.css" rel="stylesheet"></link>
<link href="<%=basePath%>views/upai/css/style1.css" rel="stylesheet"></link>
<script type="text/javascript">
	/* function initconfig() {
		setTimeout(function() {
			wx.config({
				debug : false,
				appId : 'wx177d4c8b355354b9',
				timestamp : '1481900913',
				nonceStr : 'Wm3WZYTPz0wzccnW',
				signature : '99f7a8354624689ad96553b6a413f433b90fc2a9',
				jsApiList : [ 'onMenuShareTimeline', 'onMenuShareAppMessage',
						'onMenuShareQQ', 'onMenuShareWeibo',
						'onMenuShareQZone', 'chooseImage', 'previewImage',
						'uploadImage' ]
			});
		}, 1);
		var pblWXShare = true;
		wx.ready(function() {
			setWXShare();
			if (pblWXShare)
				$('.swiper-share').slideDown(1500);

		});
		wx.error(function(res) {

			pblWXShare = false;
		});
	}
	function setWXShare() {
		wx
				.onMenuShareTimeline({
					title : 'U牌玩精油',
					link : 'http://webChat.5288168.com/ShopCenter/ShopHomepage.aspx?State=100008&ReferMemberId=1000083001009177',
					imgUrl : 'http://www.5288168.com:8080/Attachment/Temp/b9d49555-d6bb-4c76-b547-e9c760bee3cb.jpg',
					success : function() {
					},
					cancel : function() {
					}
				});
		wx
				.onMenuShareAppMessage({
					title : 'U牌玩精油',
					desc : 'From italy，50年专注精油，CAAQ国际权威有机认证，CE认证！对于U牌而言，品质是不容触碰的底线，除此之外，一切放开玩！【U牌玩精油】、【U-face】芳疗护肤、【U-WM】私密养护系列，三大系列火爆持续中！',
					link : 'http://webChat.5288168.com/ShopCenter/ShopHomepage.aspx?State=100008&ReferMemberId=1000083001009177',
					imgUrl : 'http://www.5288168.com:8080/Attachment/Temp/b9d49555-d6bb-4c76-b547-e9c760bee3cb.jpg',
					type : '',
					dataUrl : '',
					success : function() {
					},
					cancel : function() {
					}
				});
		wx
				.onMenuShareQQ({
					title : 'U牌玩精油',
					desc : 'From italy，50年专注精油，CAAQ国际权威有机认证，CE认证！对于U牌而言，品质是不容触碰的底线，除此之外，一切放开玩！【U牌玩精油】、【U-face】芳疗护肤、【U-WM】私密养护系列，三大系列火爆持续中！',
					link : 'http://webChat.5288168.com/ShopCenter/ShopHomepage.aspx?State=100008&ReferMemberId=1000083001009177',
					imgUrl : 'http://www.5288168.com:8080/Attachment/Temp/b9d49555-d6bb-4c76-b547-e9c760bee3cb.jpg',
					success : function() {
					},
					cancel : function() {
					}
				});
		wx
				.onMenuShareWeibo({
					title : 'U牌玩精油',
					desc : 'From italy，50年专注精油，CAAQ国际权威有机认证，CE认证！对于U牌而言，品质是不容触碰的底线，除此之外，一切放开玩！【U牌玩精油】、【U-face】芳疗护肤、【U-WM】私密养护系列，三大系列火爆持续中！',
					link : 'http://webChat.5288168.com/ShopCenter/ShopHomepage.aspx?State=100008&ReferMemberId=1000083001009177',
					imgUrl : 'http://www.5288168.com:8080/Attachment/Temp/b9d49555-d6bb-4c76-b547-e9c760bee3cb.jpg',
					success : function() {
					},
					cancel : function() {
					}
				});
		wx
				.onMenuShareQZone({
					title : 'U牌玩精油',
					desc : 'From italy，50年专注精油，CAAQ国际权威有机认证，CE认证！对于U牌而言，品质是不容触碰的底线，除此之外，一切放开玩！【U牌玩精油】、【U-face】芳疗护肤、【U-WM】私密养护系列，三大系列火爆持续中！',
					link : 'http://webChat.5288168.com/ShopCenter/ShopHomepage.aspx?State=100008&ReferMemberId=1000083001009177',
					imgUrl : 'http://www.5288168.com:8080/Attachment/Temp/b9d49555-d6bb-4c76-b547-e9c760bee3cb.jpg',
					success : function() {
					},
					cancel : function() {
					}
				});
	}
	initconfig(); */
</script>
</head>
<body>
	<input name="hidType" type="hidden" id="hidType" value="2" />
	<div class="mwrap">
		<!--顶部tab -->
		<div class="nav_content" id="used">
			<ul class="stuts-selected">
				<li onclick="setTab('liLab',1,5)" id="liLab1"><a>全部</a></li>
				<li onclick="setTab('liLab',2,5)" id="liLab2"><a>待付款</a></li>
				<li onclick="setTab('liLab',3,5)" id="liLab3"><a>待发货</a></li>
				<li onclick="setTab('liLab',4,5)" id="liLab4"><a>待收货</a></li>
				<li onclick="setTab('liLab',5,5)" id="liLab5"><a>待评价</a></li>
			</ul>
		</div>
		<!--顶部tab/-->

		<div class="con_liLab" id="con_liLab_1">
			<div id="waterfall">

				<div class="pin">
					<c:choose>
						<c:when test="${!empty datas}">
							<c:choose>
								<c:when test="${fn:length(datas.myOrders)==0}">
									<div id="con_liLab_noData">
										<p class="text-center mt10">
											<img src="<%=basePath%>views/images/none.png">
										</p>
										<p class="text-center mt5">您还没有当前状态的订单哦！</p>
									</div>
								</c:when>
								<c:otherwise>
									<c:forEach items="${datas.myOrders}" var="order">
										<div class="pay-content">
											<div class="order-det rel">
												<a href="#"><p>
														下单时间:${order.appDate}<span class="word-color pull-right">
															<c:choose>
																<c:when test="${order.enable==9}">
															交易关闭
														</c:when>
																<c:when test="${order.payStatus==0}">待付款</c:when>
																<c:when
																	test="${order.payStatus==1 and order.logisticsStatus==1}">待发货</c:when>
																<c:when
																	test="${order.payStatus==1 and order.logisticsStatus==2}">待收货</c:when>
																<c:when test="${order.enable==5}">已完成</c:when>
																<c:otherwise></c:otherwise>
															</c:choose>
														</span>
													</p></a>
											</div>
											<c:forEach items="${order.goodsList}" var="good">
												<dl class="g-list rel ">
													<dd class="g-img">
														<img src="<%=imagePath %>${good.image}">
													</dd>
													<dd class="g-item">
														<a class="item-link"><div class="g-name">${good.name}</div>
															<!-- <div class="g-price-amount">
												<span class="color9">_tmp1_tmp2</span>
											</div> -->
															<div class="g-price-amount">
																<span class="g-price word-color">￥${good.price}</span><span
																	class="g-amount">x${good.count}</span>
															</div></a>
													</dd>
												</dl>
											</c:forEach>
											<div class="state text-right">
												<span style="line-height: 34px; float: left;">实付：<span
													class="word-color">￥${order.money}</span></span>
												<c:choose>
													<c:when test="${order.enable==9}">

													</c:when>
													<c:when test="${order.payStatus==0}">
														<a href="javascript:void(0);"
															onclick="topay(${order.did})">支付</a>&nbsp;&nbsp;&nbsp;&nbsp;<a
															href="javascript:void(0);"
															onclick="cancelorder(${order.did})">取消订单</a>
													</c:when>
													<c:when
														test="${order.payStatus==1 and order.logisticsStatus==1}">待发货</c:when>
													<c:when
														test="${order.payStatus==1 and order.logisticsStatus==2}">
														<a
															href="https://m.kuaidi100.com/index_all.html?type=韵达&postid=${order.peisong}">查看物流</a>
														<a href="javascript:void(0);"
															onclick="receive(${order.did})">确定收货</a>
													</c:when>
													<c:when test="${order.enable==5}">
														<a href="javascript:void(0);"
															onclick="dianping(${order.did})">评价</a>
													</c:when>
													<c:otherwise></c:otherwise>
												</c:choose>
											</div>
										</div>
									</c:forEach>
								</c:otherwise>
							</c:choose>
						</c:when>
						<c:otherwise>
							<c:choose>
								<c:when test="${fn:length(noDianPingGoods)==0}">
									<div id="con_liLab_noData">
										<p class="text-center mt10">
											<img src="<%=basePath%>views/images/none.png">
										</p>
										<p class="text-center mt5">您还没有待评价的商品哦！</p>
									</div>
								</c:when>
								<c:otherwise>
									<c:forEach items="${noDianPingGoods}" var="good">
										<div class="pay-content">
											<dl class="g-list rel ">
												<dd class="g-img">
													<img src="<%=imagePath %>${good.image}">
												</dd>
												<dd class="g-item">
													<a class="item-link"><div class="g-name">${good.name}</div>
														<div class="g-price-amount">
															<span class="g-price word-color">￥${good.productprice}</span>
														</div></a>
												</dd>
											</dl>
											<div class="state text-right">
												<a href="javascript:void(0);"
													onclick="dianping(${good.id},${good.rid})">评价</a>
											</div>
										</div>
									</c:forEach>
								</c:otherwise>
							</c:choose>
						</c:otherwise>
					</c:choose>
				</div>
			</div>
		</div>
	</div>
	<!--footer -->
	<!--<div class="footer"></div>
	-->

	<!----------悬浮底部------------>
	<div style="height: 1.2rem"></div>
	<jsp:include page="footerNav4.jsp"></jsp:include>

	<!-----点击滑动到顶部---->
	<div id="returnTop" class="returnTop"></div>
	<!-----点击滑动到顶部end---->

	<script type="text/javascript"
		src="<%=basePath%>views/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript"
		src="<%=basePath%>views/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>views/js/layer.m.js"></script>
	<%-- <script type="text/javascript" src="<%=basePath%>views/js/jquery.infinitescroll.min.js"></script> --%>
	<script type="text/javascript"
		src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script type="text/javascript" src="<%=basePath%>views/js/CommonJS.js"></script>
	<script type="text/javascript"
		src="<%=basePath%>views/js/WeiXin/WeChatJS-SDK.js"></script>
	<script type="text/javascript"
		src="<%=basePath%>views/js/MemberCenter/OrderCenter.js"></script>
	<script src="<%=basePath%>views/upai/js/jquery-1.9.1.min.js"></script>
	<script src="<%=basePath%>views/upai/js/idangerous.swiper.min.js"></script>
	<script src="<%=basePath%>views/upai/layui/layui.js" charset="utf-8"></script>
	<script src="<%=basePath%>views/upai/js/common.js" charset="utf-8"></script>
	<script type="text/javascript"
		src="<%=basePath%>views/upai/js/jquery.event.drag.js"></script>
	<script type="text/javascript"
		src="<%=basePath%>views/upai/js/jquery.touchSlider.js"></script>
</body>
<script>
//收货
function receive(id){
	$.ajax({
		type:"post",
		url:"../mobile/updateOrder",
		data : "id=" +id + "&dd_status=6&enable=5",
		success : function(msg) {
			var info = eval('(' + msg + ')');
			alert(info.information);
			window.location.reload();
		}
	})
}

function cancelorder(id){
	$.ajax({
		type:"post",
		url:"../mobile/updateOrder",
		data : "id=" +id + "&dd_status=7&enable=9",
		success : function(msg) {
			var info = eval('(' + msg + ')');
					/* alert(info.information); */
			window.location.reload();
		}
	})
}

function dianping(goodid,orderid){
	window.location.href="../mobile/dianping?goodid="+goodid+"&orderid="+orderid;
}

function topay(id){
	window.location.href="../mobile/topay?orderid="+id;
}
</script>
<!-------点击滑动到顶部-------->
<script>
		$(function() {
			$("#returnTop").click(function() {
				var speed = 500;//滑动的速度
				$('body,html').animate({
					scrollTop : 0
				}, speed);
				return false;
			});
		});
	</script>
</html>
